package com.yuhan.common.enums;

/**
 * @description: 响应码定义
 * @author: hejing
 * @create: 2019/8/29
 **/
public enum CodeEnum {
    SUCCESS(0, "success"),
    ERROR_1001(1001, "系统错误"),
    ERROR_1002(1002, "用户名或密码错误"),
    ERROR_1003(1003, "header缺少YUHAN-AUTH参数"),
    ERROR_1004(1004, "登录认证失效，请重新登录"),
    ERROR_1005(1005, "没有权限，请联系管理员授权"),
    ERROR_1006(1006, "参数错误，请参考API文档"),
    ERROR_1007(1007, "接口不存在"),
    ERROR_1008(1008, "请求的Http方法不支持，请检查是否选择了正确的Http方法"),
    ERROR_1009(1009, "存在重复记录"),
    ERROR_1010(1010, "所需请求主体丢失");
    private int code;
    private String msg;

    CodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }
}
